<?php

namespace App\Services;

use App\Models\Brand;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;

class BrandService extends BaseService {

    public function getList($page, $pageSize, $sort, $order, $columns): LengthAwarePaginator
    {
        return Brand::query()->orderBy($sort,$order)->paginate($pageSize, $columns, $pageName = 'page', $page);
    }

    public function getById($id)
    {
        return Brand::query()->where('id','=',$id)->first();
    }
}
